<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
        //let 变量块级作用域，this不是window下的属性
        //const 常量块级作用域，不能修改初始值，一般用做函数,防止重名被覆盖
        let a = 1;
        let b = 2;
        const obj = {
            a,
            b,
            getName(){
                console.log('jh')
            }
        }
        obj.a = 3
        //不能直接覆盖
        // obj = {}
        // console.log(obj)

        // const arr = [1,2,4]
        // arr.push(5)
        // console.log(arr)

        //数组合并
        const arr2 =[3,4]
        const arr1 =[1,2,...arr2]
        console.log(arr1)
        
        //扩展运算符
        // const arr3 = [...arr1,...arr2]
        
        // console.log(arr3)


    </script>
  </body>
</html>
